package com.whzjkj.gateway.server.session;

import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;

/**
 * @description:
 * @author: Mr.Hu
 * @create: 2018-11-01 10:42
 **/
public interface SessionManager {

    boolean containsKey(String sessionId);

    boolean containsSession(Session session);

    Session findBySessionId(String id);

    Session findByTerminalPhone(String phone);

    Session put(String key, Session value);

    Session removeBySessionId(String sessionId);

    Set<String> keySet();

    void forEach(BiConsumer<? super String, ? super Session> action);

    Set<Map.Entry<String, Session>> entrySet();
}
